﻿#define _CRT_SECURE_NO_WARNINGS 1

class Solution
{
public:
	int getSum(int a, int b)
	{
		while (b != 0)
		{
			int x = a ^ b; // 先算出⽆进位相加的结果
			unsigned int carry = (unsigned int)(a & b) << 1; // 算出进位
			a = x;
			b = carry;
		}
		return a;
	}
};